#pragma once
#include <Arduino.h>
#include <SPI.h>
#include "../../include/config.h"
#define LCD_WIDTH 320  // LCD width
#define LCD_HEIGHT 172 // LCD height

#define SPIFreq 80000000
#define Frequency 10000
#define Resolution 8

#define VERTICAL 0
#define HORIZONTAL 1

#define Offset_X 0
#define Offset_Y 34

// 添加LCD控制函数声明
void LCD_WriteCommand(uint8_t cmd);
void LCD_WriteData(uint8_t data);

void LCD_SetCursor(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);

void LCD_Init(void);
void LCD_SetCursor(uint16_t Xstart, uint16_t Ystart, uint16_t Xend, uint16_t Yend);
void LCD_addWindow(uint16_t Xstart, uint16_t Ystart, uint16_t Xend, uint16_t Yend, uint16_t *color);

void Backlight_Init(void);
void Set_Backlight(uint8_t Light);
